package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.HoFeedbackComplaintMapper;
import com.ruoyi.system.domain.HoFeedbackComplaint;
import com.ruoyi.system.service.IHoFeedbackComplaintService;

/**
 * 反馈与投诉Service业务层处理
 *
 * @author ruoyi
 * @date 2025-01-10
 */
@Service
public class HoFeedbackComplaintServiceImpl implements IHoFeedbackComplaintService {
    @Autowired
    private HoFeedbackComplaintMapper hoFeedbackComplaintMapper;

    /**
     * 查询反馈与投诉
     *
     * @param id 反馈与投诉主键
     * @return 反馈与投诉
     */
    @Override
    public HoFeedbackComplaint selectHoFeedbackComplaintById(Long id) {
        return hoFeedbackComplaintMapper.selectHoFeedbackComplaintById(id);
    }

    /**
     * 查询反馈与投诉列表
     *
     * @param hoFeedbackComplaint 反馈与投诉
     * @return 反馈与投诉
     */
    @Override
    public List<HoFeedbackComplaint> selectHoFeedbackComplaintList(HoFeedbackComplaint hoFeedbackComplaint) {
        return hoFeedbackComplaintMapper.selectHoFeedbackComplaintList(hoFeedbackComplaint);
    }

    /**
     * 新增反馈与投诉
     *
     * @param hoFeedbackComplaint 反馈与投诉
     * @return 结果
     */
    @Override
    public int insertHoFeedbackComplaint(HoFeedbackComplaint hoFeedbackComplaint) {
        hoFeedbackComplaint.setCreateTime(DateUtils.getNowDate());
        return hoFeedbackComplaintMapper.insertHoFeedbackComplaint(hoFeedbackComplaint);
    }

    /**
     * 修改反馈与投诉
     *
     * @param hoFeedbackComplaint 反馈与投诉
     * @return 结果
     */
    @Override
    public int updateHoFeedbackComplaint(HoFeedbackComplaint hoFeedbackComplaint) {
        hoFeedbackComplaint.setUpdateTime(DateUtils.getNowDate());
        return hoFeedbackComplaintMapper.updateHoFeedbackComplaint(hoFeedbackComplaint);
    }

    /**
     * 批量删除反馈与投诉
     *
     * @param ids 需要删除的反馈与投诉主键
     * @return 结果
     */
    @Override
    public int deleteHoFeedbackComplaintByIds(Long[] ids) {
        return hoFeedbackComplaintMapper.deleteHoFeedbackComplaintByIds(ids);
    }

    /**
     * 删除反馈与投诉信息
     *
     * @param id 反馈与投诉主键
     * @return 结果
     */
    @Override
    public int deleteHoFeedbackComplaintById(Long id) {
        return hoFeedbackComplaintMapper.deleteHoFeedbackComplaintById(id);
    }
}
